#!/usr/bin/python
#
# gphotoframe - Photo Frame for the GNOME Desktop.
#
# Copyright (c) 2009-2011, Yoshizumi Endo.
# Licence: GPL3

import os
import platform
from os.path import join, abspath, dirname

try:
    from gi.repository import GtkClutter
    GtkClutter.init([])

    # from gi.repository import GObject
    # GObject.threads_init()
except ImportError:
    pass

try:
    from lib.utils import gtk3reactor
except ImportError:
    from gphotoframe.utils import gtk3reactor

gtk3reactor.install()

from twisted.internet import reactor

if os.access(
    abspath(join(dirname(__file__), 'lib/liststore.py')), os.R_OK):
    from lib.liststore import PhotoListStore
    from lib.defaultsource import set_default_photo_source
else:
    from gphotoframe.liststore import PhotoListStore
    from gphotoframe.defaultsource import set_default_photo_source

if __name__ == '__main__':
    set_default_photo_source()

    PhotoListStore()
    reactor.run()
